<?php
/**
 * User: Jerry
 * Date: 2017/8/28
 * Time: 10:31
 */

namespace SDXApi\Model;


use Think\Model;

/**
 * Class NavTestUserModel
 * @author Jerry
 * @package SDXApi\Model
 */
class NavTestUserModel extends Model
{
    /**
     * @var string
     */
    protected $tableName = 'nav_test_user';


    /**
     * @author Jerry
     * @return mixed
     */
    public function findTestUsers()
    {
        return $this->select();
    }

    /**
     * @author Jerry
     * @param int $userId
     * @return mixed
     */
    public function isTestByUserId($userId = 0)
    {
        $where = array(
            'uid'   =>  $userId,
        );

        $count = $this->where($where)->count('id');
        return $count;
    }
}